package cn.edu.scau.cmi.zhouxinyue.Singleton;

import javafx.fxml.FXML;

import javafx.scene.control.Button;

import javafx.scene.control.TextField;

import java.util.ArrayList;

import javafx.event.ActionEvent;

import javafx.scene.control.Label;

import javafx.scene.control.TextArea;

public class SingletonController {
	@FXML
	private Button Abutton;
	@FXML
	private TextField Cname;
	@FXML
	private Button Sbutton;
	@FXML
	private Label Alabel;
	@FXML
	private Label Blabel;
	@FXML
	private Label STlabel;
	@FXML
	private TextArea Slabel;
	@FXML
	private TextField Gname;
	
	public void OneChairman() {
		Chairman mao = Chairman.getInstance(Cname.getText());
		String Chaiman = mao.toString();
		Alabel.setText(mao.showname()+Chaiman);		
	}
	public void MoreChairman() {
		General zhu=General.NewGeneral(Gname.getText());        
		Slabel.appendText(zhu.showname()+zhu.toString()+' '+zhu.getnumber()+"\n");
		
	}
}
